import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import qs from 'qs'
//导入axios
import axios from 'axios'
Vue.prototype.axios = axios;//通过this就可以直接访问http
axios.defaults.baseURL = "http://127.0.0.1:5000/"//配置请求的跟路径
//请求拦截
axios.interceptors.request.use(config=>{
  // console.log(config);
  config.headers.Authorization=window.sessionStorage.getItem('isLogined');
  //在最后必须return config
  return config
})

import { Message } from 'element-ui'

//导入字体图标
import './assets/fonts/iconfont.css'

//导入全局样式表
import './assets/css/global.css'

Vue.config.productionTip = false

//导入element-ui样式
import 'element-ui/lib/theme-chalk/index.css'

//导入element-ui
import Element from 'element-ui'

//将element-ui注册为组件
Vue.use(Element);


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
